var path = 'http://192.168.1.191:8080';
var getQueryString = function(e) {
    var n;
    var r = String(window.document.location.href);
    var t = new RegExp("(^|)" + e + "=([^&]*)(&|$)", "gi").exec(r);
    return (n = t) ? n[2] : ""
}
function formateMoney(s, n) {
    if (s == 0) {
        return 0;
    }
    n = n > 0 && n <= 20 ? n : 2;
    s = parseFloat((s + "").replace(/[^\d\.-]/g, "")).toFixed(n) + "";
    var l = s.split(".")[0].split("").reverse(), r = s.split(".")[1];
    t = "";
    for ( i = 0; i < l.length; i++) {
        t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
    }
    return t.split("").reverse().join("") + "." + r;
}
// 输入框只能输入数字和.  小数点后只能输入两位
function num(e){
    var value = $(e).val();
    value=value.replace(/[^\d.]/g,"");
    value=value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');
    $(e).val(value);
}
